#
# @ : Copyright (c) 2021 Phytium Information Technology, Inc. 
#  
# SPDX-License-Identifier: Apache-2.0.
# 
# @Date: 2021-05-31 16:54:49
# @LastEditTime: 2021-05-31 16:55:15
# @Description:  This files is for baremetal build config
# 
# @Modify History: 
#  Ver   Who        Date         Changes
# ----- ------     --------    --------------------------------------
#

.PHONY: menuconfig oldconfig alldefconfig savedefconfig lddefconfig genconfig
menuconfig:
	$(STANDALONE_DIR)/lib/Kconfiglib/menuconfig.py
	$(STANDALONE_DIR)/lib/Kconfiglib/genconfig.py

genconfig:
	$(STANDALONE_DIR)/lib/Kconfiglib/genconfig.py

# backup current configs
oldconfig:
	$(STANDALONE_DIR)/lib/Kconfiglib/oldconfig.py

# write configuration where all symbols and set as
#	default val
alldefconfig:
	$(STANDALONE_DIR)/lib/Kconfiglib/alldefconfig.py

# # Saves a minimal configuration file that only lists symbols that differ in value
# #	from their defaults
savedefconfig:
	$(STANDALONE_DIR)/lib/Kconfiglib/savedefconfig.py

lddefconfig:
	cp $(STANDALONE_DIR)/configs/$(DEF_KCONFIG) ./$(KCONFIG_CONFIG) -f
	@echo "get default configs at " $(STANDALONE_DIR)/configs/$(DEF_KCONFIG)

# load default configs，then generate sdkconfig.h, and clean build targets
# support platform
#	FT2000/4 AARCH32/AARCH64
# 	D2000 AARCH32/AARCH64
#	E2000 AARCH32/AARCH64
.PHONY: config_ft2004_aarch32 config_ft2004_aarch64 config_e2000_aarch32 config_e2000_aarch64 config_d2000_aarch32 config_d2000_aarch64
		config_amp_master_core0_d2000_aarch32

config_ft2004_aarch32: lddefconfig genconfig clean
config_ft2004_aarch64: lddefconfig genconfig clean
config_e2000_aarch32: lddefconfig genconfig clean
config_e2000_aarch64: lddefconfig genconfig clean
config_d2000_aarch32: lddefconfig genconfig clean
config_d2000_aarch64: lddefconfig genconfig clean
config_amp_master_d2000_aarch32: lddefconfig genconfig clean
config_amp_slave_d2000_aarch32:lddefconfig genconfig clean
